package com.gwclh.personnel.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * <p>
 * 部门表
 * </p>
 *
 * @author gzhhh
 * @since 2020-07-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_department")
@ApiModel(value="Department对象", description="部门表")
public class Department implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "部门id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "上级部门id，0表示1级部门，默认值0")
//    @TableField(value = "p_id")
    private Integer pId;

    @ApiModelProperty(value = "部门名称")
    private String deptName;

    public Integer getpId() {
        return pId;
    }

    public void setpId(Integer pId) {
        this.pId = pId;
    }

    @ApiModelProperty(value = "部门类型，0公司，1部门,默认为1")
    private Integer deptType;

    @ApiModelProperty(value = "部门电话")
    private String deptPhone;

    @ApiModelProperty(value = "传真")
    private String deptFax;

    @ApiModelProperty(value = "描述")
    private String deptDesc;

    @ApiModelProperty(value = "成立日期,自动填充")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "修改日期，自动填充")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

}
